<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/webCommon/webCommon.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>作品添加</title>

<script type="text/javascript" src="plugins/layui/layui.js"></script>
<script>
	layui.use([ 'form', 'layedit', 'laydate' ], function() {
		var form = layui.form(),
			layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;
		//监听提交
		form.on('submit(tijiao)', function(data) {
			layer.alert(JSON.stringify(data.field), {
				title : '最终的提交信息'
			})
		});
		//执行一个laydate实例
		  laydate.render({
		    elem: '#fileStartTime' //指定元素
		    ,type: 'datetime'
		  });
		  layui.upload({
			  url: '上传接口url'
			  ,success: function(res){
			    console.log(res); //上传成功返回值，必须为json格式
			  }
			}); 
	});
</script>

</head>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="#">作品管理</a></li>
			<li><a href="#">添加作品信息</a></li>
		</ul>
	</div>
	<div style="margin: 15px;">
		<form class="layui-form" action="<%=basePath%>/sys/ServiceWork_Stuadd.action" enctype="multipart/form-data" method="post">
			<div class="layui-form-item">
				<label class="layui-form-label">作品名称</label>
				<div class="layui-input-inline">
					<input type="text" name="workName" lay-verify="workName" autocomplete="off" placeholder="作品名称" class="layui-input">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">作品简介</label>
				<div class="layui-input-block">
					<input type="text" class="layui-textarea" name="workProfile" lay-verify="workProfile" autocomplete="off" placeholder="作品简介" class="layui-input">
				</div>
			</div>
			
			
			<div class="layui-form-item">
				<label class="layui-form-label">分组名称</label>
				<div class="layui-input-inline">
					<select name="studentGroupId" id="studentGroupId">
						<option  value="">请选择...</option>
						<s:iterator value="serviceStudentGroupList">
							<option value="${studentGroupId}" id="${studentGroupId}">${studentGroupName}</option>
						</s:iterator>
					</select>
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">文件名称</label>
				<div class="layui-input-inline">
					 <input type="text"   name="fileNames" id="fileNames" lay-verify="fileName" autocomplete="off" placeholder="文件名称" class="layui-input">
				</div>
			</div>
			
			 <div class="layui-inline-item"  >
				<label class="layui-form-label">附件</label>
					<div class="layui-input-inline">
						<div class="site-doc-icon">
		                	  <input type="file" name="upload" id="upload">
						</div>
				</div>
			</div> 
			
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button id="tijiao" class="layui-btn" lay-filter="tijiao" lay-submit="">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>

	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
</body>
</html>
